
<script setup lang="ts">
import { ref } from 'vue';

const shuiguo=ref(['苹果','香蕉','梨','橘子'])

</script>

<template>
  <div class="page">
  <button v-for="(item,index) in shuiguo" :key="index">

    {{ index }} -- {{ item }}
  </button>
<div>
  
  <button v-for="item in shuiguo":key='item'>
    {{ item }}
  </button>
</div>
  
  </div>
</template>

<style scoped></style>
  